//
//  ChildrenModel.m
//  课余时间
//
//  Created by zgr on 16/4/9.
//  Copyright © 2016年 张大少. All rights reserved.
//

#import "ChildrenModel.h"
@implementation ChildrenModel
-(void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"sections"]) {
        
        self.sectionModel = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            SectionsModel *model = [[SectionsModel alloc]init];
            [model setValuesForKeysWithDictionary:dic];
            [_sectionModel addObject:model];
        }
     
    }
    else if([key isEqualToString:@"id"])
    {
        self.childrenID = value;
        
    }
}
@end
